package com.lrs.java.j2se_base.baseSyntax;

import java.util.ArrayList;
import java.util.List;

public class TestObjectArray {

	private enum Size {
		SMALL, LARGER;
	}
	
	public static void main(String[] args) {
		
		testObjectArray();
		testComponentMethod();
		testEnum();
		
		
	}

	private static void testEnum() {
		Size size = Enum.valueOf(Size.class, "SMALL");
		System.out.println(Size.SMALL.getClass().getName());
	}
	
	private static void testObjectArray() {

		print(new int[] {1, 2});
		print(new String[] {"a", "b"});
		print(new Double[] {1D, 2D}, 2);
	}


	public static void testComponentMethod() {
		String str = "a";
		String[] strArr = new String[]{};
		List<String> strList = new ArrayList<String>();
		
//		System.out.println(str.getClass().getComponentType().getName());
		System.out.println(strArr.getClass().getComponentType().getName());
//		System.out.println(strList.getClass().getComponentType().getName());
		
	}
	
//	public static void print(Object[] objs) {
//		
//	}
	
	public static void print(Object...obj) {
		for(Object o : obj) {
			System.out.println(o);
		}
	}
	
	
}
